package ${package.Parent}.domain.request.${table.entityPath};

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.io.Serializable;
<#-- 检查是否有 Date 字段 -->
<#assign hasDateField = false>
<#list table.fields as field>
    <#if field.propertyType == "Date">
        <#assign hasDateField = true>
        <#break>
    </#if>
</#list>
<#if hasDateField>
import java.util.Date;
</#if>
<#-- 检查是否有 BigDecimal 字段 -->
<#assign hasBigDecimalField = false>
<#list table.fields as field>
    <#if field.propertyType == "BigDecimal">
        <#assign hasBigDecimalField = true>
        <#break>
    </#if>
</#list>
<#if hasBigDecimalField>
import java.math.BigDecimal;
</#if>
<#-- 检查是否有 JSON 字段 -->
<#assign hasJsonField = false>
<#list table.fields as field>
    <#if field.columnType?? && field.columnType?lower_case?contains("json")>
        <#assign hasJsonField = true>
        <#break>
    </#if>
</#list>
<#if hasJsonField>
import com.alibaba.fastjson2.JSONObject;
</#if>

/**
 * <p>
 * ${table.comment!}更新请求对象
 * </p>
 *
 * @author ${author}
 * @since ${date}
 */
@Data
@Schema(description = "${table.comment!}更新请求")
public class ${entity}UpdateRequest implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "操作者ID",hidden = true)
    private String operatorId;

    @Schema(description = "操作时间",hidden = true)
    private Date operateTime;

<#-- 包含ID字段，排除其他通用字段，不添加@NotNull注解 -->
<#list table.fields as field>
    <#if field.keyFlag || (field.propertyName != "createTime" && field.propertyName != "createId" && field.propertyName != "updateTime" && field.propertyName != "updateId" && field.propertyName != "delFlag")>
    <#if field.comment!?length gt 0>
    @Schema(description = "${field.comment}")
    </#if>
    private ${field.propertyType} ${field.propertyName};

    </#if>
</#list>


}